<template>
  <transition appear appear-active-class="fadeInUpMini">
    <div>
      <div v-for="item in adviceList" :key="item.id">
        <advice-item :adviceItem="item"></advice-item>
      </div>
    </div>
  </transition>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import axios from "@/http";
import { adviceType } from "@/type/advice";
import adviceItem from "./adviceItem.vue";
onMounted(() => {
  getAdviceList();
});
const adviceList = ref<adviceType[]>([]);
const getAdviceList = () => {
  axios.get("/advice/search").then((res) => {
    console.log(res);
    adviceList.value = res.data.data;
  });
};
</script>

<style lang="scss" scoped></style>
